package com.eds.pojo;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 返回状态码枚举类
 */
@Getter
@AllArgsConstructor
public enum CodeEnum {

    // 正常
    SUCCESS(200, "SUCCESS"),
    // 系统异常
    SYSTEM_ERROR(500, "系统异常"),
    // 业务异常
    PARAMETER_ERROR(601, "参数异常"),
    DEFAULT_VALUE(1, "默认值"),
    DEFAULT_PAGE_SIZE_VALUE(10, "默认页面尺寸"),
    // 添加商品类型异常
    DATA_NOT_FOUND(701, "未找到数据"),
    CAPTCHA_VERIFY_ERROR(702, "验证码不正确"),
    LOGIN_ERROR(703, "登录失败"),
    LOGIN_NAME_OR_PASSWORD_IS_NULL(704, "用户名或密码为空"),
    LOGIN_NAME_OR_PASSWORD_ERROR(705, "用户名或密码输入错误"),
    TOKEN_IS_NULL(706, "Token为空"),
    UPDATE_LAST_LOGIN_DATE_ERROR(707, "更新最近登录时间失败"),
    USERNAME_OR_PHONE_REGISTED(708, "用户名或密码已经被注册"),
    REGISTER_ERROR(709, "注册失败"),
    REGISTER_SUCCESS(710, "注册成功"),
    GET_DEFAULT_HEAD_ERROR(711, "获取默认头像失败"),
    UPDATE_HEAD_ERROR(712, "更新头像失败"),
    REGISTER_CREATE_PREFERENCE_ERROR(713, "新增用户时创建兴趣表失败"),
    SEND_SMS_MESSAGE_ERROR(714, "发送验证码失败"),
    SEND_SMS_MESSAGE_SUCCESS(715, "发送验证码成功"),
    CHECK_SMS_MESSAGE_ERROR(716, "检查验证码失败"),
    CHECK_SMS_MESSAGE_SUCCESS(717, "检查验证码成功"),
    SELECT_USER_INFO_BY_MOBILE_ERROR(718, "通过手机号查询用户信息失败"),
    PARAM_ERROR(719, "参数异常"),
    USERNAME_ID_NULL_OR_PHONE_ERROR(720, "用户名不存在或手机号不匹配"),
    FAILED_RETRIEVE_PASSWORD(721, "找回密码失败"),
    SUCCESS_RETRIEVE_PASSWORD(722, "找回密码成功"),
    GET_HEAD_ERROR(723, "获取头像失败"),
    GET_USERNAME_ERROR(724, "获取用户名失败"),
    SELECT_USER_PREFERENCE_ERROR(725, "查询用户兴趣失败"),
    SELECT_USER_DETAILS_ERROR(726, "获取用户详细信息失败"),
    LEAST_ONE_FIELD_BE_UPDATED(727, "至少需要提供一个更新字段"),
    UPDATE_USER_INFO_ERROR(728, "修改用户信息失败"),
    UPDATE_PREFERENCE_ERROR(729, "修改用户喜好失败"),
    DIFFERENT_INFO(730, "信息不一致"),
    UPLOAD_HEAD_ERROR(731, "上传头像失败"),
    GET_USERID_BY_TOKEN(732, "通过token获取userId失败"),
    SELECT_USER_INFO_BY_USERID_ERROR(733, "通过UserId获取用户信息失败"),
    TOKEN_NOT_BEARER(734, "Token无Bearer"),
    SELECT_ALL_COURSES_PAGE_ERROR(735, "分页查询所有课程失败"),
    SELECT_COURSE_INFO_BY_ID_ERROR(736, "根据课程Id查课程信息失败"),
    SELECT_COURSE_SCHEDULE_INFO_BY_COURSE_ID_ERROR(737, "根据课程查询老师时间失败"),
    SELECT_COURSE_INFO_BY_TEACHER_ID_ERROR(738, "根据老师查课程信息失败"),
    GET_COURSE_INFO_BY_TOKEN(739, "通过token获取课程信息失败"),
    CREATE_COURSE_ERROR(740, "新建课程失败"),
    COURSE_TITLE_IMG_UPLOAD_ERROR(741, "标题上传失败"),
    UPDATE_COURSE_TITLE_IMAGE_ERROR(742, "更新课程标题图片异常"),
    HANDLE_AVAILABILITY_DATA_ERROR(743, "处理老师习惯数据失败"),
    HANDLE_SCHEDULE_DATA_ERROR(744, "处理老师时间数据失败"),
    UPLOAD_IMAGES_ERROR(745, "上传图片错误"),
    AI_TALK_ERROR(746, "AI交流失败"),
    CREATE_CONVERSATION_ERROR(747, "新增会话失败"),
    CREATE_MESSAGE_ERROR(748, "新增消息失败"),
    UPDATE_LAST_MESSAGE_DATE_ERROR(749, "更新会话的最后一条消息和更新时间"),
    GET_USER_ALL_CONVERSATION_LIST_ERROR(750, "获取用户的所有对话列表失败"),
    GET_APPOINT_CONVERSATION_LIST_ERROR(751, "获取特定对话的消息历史失败"),
    DELETE_CONVERSATION_ERROR(752, "删除会话失败"),
    CONVERSATION_IS_NOT_BELONG_USER(753, "会话不属于该用户"),
    SELECT_COURSE_AVAILABILITY_INFO_BY_COURSE_ID_ERROR(754, "根据课程查询老师固定时间失败"),
    DELETE_COURSE_ERROR(755, "删除课程异常"),
    NO_AUTH_TO_CHANGE(756, "无权修改"),
    DELETE_COURSE_IMAGE_ERROR(757, "删除课程图片异常"),
    UPDATE_COURSE_IMG_ERROR(758, "更新课程图片异常"),
    UPDATE_COURSE_AVAILABILITY_INFO_ERROR(759, "更新课程习惯时间失败"),
    UPDATE_COURSE_SCHEDULE_INFO_ERROR(759, "更新课程固定时间失败"),
    LESSON_NOT_NULL(760, "课程时间不能为空"),
    UPDATE_COURSE_ERROR(761, "课程更新失败"),
    COURSE_IS_NULL(762, "课程为空"),
    GET_COURSE_TABLE_ERROR(763, "获取课程表失败"),
    BOOK_COURSE_ERROR(764, "预约课程失败"),
    COURSE_IS_NOT_AVAILABLE(765, "课程不可预约"),
    COURSE_TIME_CONFLICT(766, "课程时间冲突"),
    CREATE_BOOKING_ERROR(767, "预约失败"),
    UPDATE_SCHEDULE_STATUS_ERROR(768, "更新课程状态失败"),
    SELECT_COURSE_INFO_BY_SCHEDULE_ID_ERROR(769, "根据课程查询老师固定时间失败"),
    SCHEDULE_NOT_EXIST(770, "课程时间不存在"),
    COURSE_BOOKING_NOT_EXIST(771, "预约记录不存在"),
    COURSE_BOOKING_UPDATE_ERROR(772, "预约记录更新失败"),
    ORDERS_DELETE_ERROR(773, "删除订单失败"),
    ORDERS_SELECT_ERROR(774, "查询订单失败"),
    ORDERS_NOT_EXIST(775, "订单不存在"),
    SERVER_ERROR(775, "服务器异常"),
    QR_CODE_TIME_OUT(776, "二维码超时"),
    ORDERS_PAY_ERROR(777, "订单支付失败"),
    INSERT_COURSE_REVIEW_ERROR(778, "插入课程评价失败"),
    DELETE_COURSE_REVIEW_ERROR(779, "删除课程评价失败"),
    GET_COURSE_REVIEW_LIST_ERROR(780, "获取课程评价列表失败"),
    REPLY_COURSE_REVIEW_ERROR(781, "回复课程评价失败"),
    GET_COURSE_REVIEW_REPLY_LIST_ERROR(782, "获取课程评价回复列表失败"),
    REVIEW_ERROR(783, "评论失败"),
    ORDERS_REFUND_ERROR(784, "订单退款失败"),
    VERIFY_TOKEN_ERROR(785, "用户不匹配"),
    GET_USER_NOTIFICATION_LIST_ERROR(786, "获取用户通知列表失败"),
    GET_UNREAD_NOTIFICATION_ERROR(787, "获取未读通知列表失败"),
    READ_NOTIFICATION_ERROR(788, "已读通知失败"),
    MESSAGE_HANDLE_ERROR(789, "消息处理失败，已进入死信队列"),
    DELETE_NOTIFICATION_ERROR(789, "删除通知失败"),
    HAPPY_RECOMMENDATIONS_ERROR(790, "获取开心一刻失败"),
    SEARCH_COURSE_ERROR(791, "搜索课程失败"),
    Not_Authority(792, "没有权限访问该资源"),
    EXPIRED_TOKEN(793, "认证失败"),
    GET_USER_AVATAR_ERROR(794, "获取用户头像失败"),
    SELECT_USER_ERROR(795, "获取用户信息失败"),
    DELETE_USER_ERROR(796, "删除用户失败"),
    UPDATE_COURSE_PRICE_ERROR(797, "更新课程价格失败"),
    UPDATE_COURSE_STATUS_ERROR(798, "更新课程状态异常"),
    GET_USER_BOARD_ERROR(799, "获取用户看板失败"),
    GET_ORDERS_BOARD_ERROR(800, "获取订单看板失败"),
    GET_TREND_ERROR(801, "获取趋势看板失败"),

    INSERT_PRODUCT_TYPE_ERROR(602, "3级商品类型不能添加子类型"),
    DELETE_PRODUCT_TYPE_ERROR(603, "该类型有子类型，禁止删除"),
    UPLOAD_FILE_ERROR(604, "文件上传异常"),
    REGISTER_CODE_ERROR(605, "注册验证码错误"),
    REGISTER_REPEAT_PHONE_ERROR(606, "注册手机号重复"),
    REGISTER_REPEAT_NAME_ERROR(607, "注册用户名重复"),
    LOGIN_NAME_PASSWORD_ERROR(608, "用户名或密码错误"),
    LOGIN_CODE_SEND_ERROR(609, "验证码发送错误"),
    LOGIN_NOPHONE_ERROR(610, "该手机号没有注册"),
    LOGIN_USER_STATUS_ERROR(611,"该用户状态异常"),
    QR_CODE_ERROR(612, "二维码生成异常"),
    CHECK_SIGN_ERROR(613, "支付宝验签异常"),
    NO_STOCK_ERROR(614, "商品库存不足"),
    ORDER_EXPIRED_ERROR(615, "订单不存在或订单超时"),
    ORDER_STATUS_ERROR(616, "订单状态异常"),
    LOGIN_CODE_ERROR(618, "登录验证码错误"),
    LOGIN_NAME_PASSWORD_PASSWORD_IS_NULL(619, "用户名不能为空"),
    //REGISTER_ERROR(619, "注册失败"),
    RESET_PASSWORD(620, "重置密码失败"),
    //PARAM_ERROR(621, "参数错误"),
    INSERT_COURSE_ERROR(622, "新建课程失败"),
    //UPLOAD_IMAGES_ERROR(623, "上传图片错误"),
    COURSE_IMAGES_INSERT_ERROR(624, "课程图片添加失败");

    private final Integer code;
    private final String message;
}
